﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Twitter;

namespace FriendsNearbyBot
{
	internal class Greeter : IGreeter
	{
        IMessageBuilder messageBuilder;

        public Greeter() : this(new PlainTextMessageBuilder())
        {
        }

        public Greeter(IMessageBuilder messageBuilder)
        {
            this.messageBuilder = messageBuilder;
        }

		public void Greet(IBotClient client, string newFriend)
		{
            messageBuilder.Clear();
            messageBuilder.AppendFragment(Properties.Resources.GreetMessage);
            client.SendMessages(newFriend, messageBuilder.GetMessages(), null, this.GetType().Name);
		}
	}
}
